Open
Conversation
Integrate the read_lints tool into the assistant message handling and native tool call parser. Update task management to track edited file paths for read_lints functionality. Enhance tool parameter definitions and ensure proper registration in the native tools index.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add read_lints tool
Related GitHub Issue
Closes: #11827
Roo Code Task Context (Optional)
None.
Description
This PR adds a read_lints tool so the assistant can query linter errors and warnings from the workspace, similar to Cursor’s ReadLints.
paths(file or directory). When omitted, lints are limited to files edited in the current task; when provided, lints are limited to those paths. Uses existingdiagnosticsToProblemsStringand respectsincludeDiagnosticMessagesandmaxDiagnosticMessagesfrom extension state.TaskgetseditedFilePathsandrecordEditedFile(relPath).DiffViewProvidercallsrecordEditedFileafter successfulsaveDirectlyandsaveChangesso “edited only” mode is accurate.ReadLintsToolhandler; registration in native-tools index,presentAssistantMessage(including tool description for streaming), andNativeToolCallParser(withcoerceStringArrayforpaths). Added totoolNames,TOOL_GROUPS.read,NativeToolArgs, andTOOL_DISPLAY_NAMES.No approval UX for read_lints (read-only, like
list_files/read_file).Test Procedure
src/core/tools/__tests__/readLintsTool.spec.ts— six cases: no paths + no edited files → “no files edited yet” message; no paths + edited files → diagnostics filtered to those files;includeDiagnosticMessages: false→ “No errors or warnings”; withpaths→ diagnostics for requested file; empty diagnostics → “No errors or warnings”; severity filter → only Error and Warning passed todiagnosticsToProblemsString.roo-clinepackage (e.g.pnpm exec vitest run core/tools/__tests__/readLintsTool.spec.tsfrom thesrcdirectory). Full typecheck:pnpm run check-types.Pre-Submission Checklist
Screenshots / Videos
No UI changes. Tool appears in chat as a tool call (e.g.
[read_lints]or[read_lints for paths]) and returns text with diagnostics.Documentation Updates
Additional Notes
diagnosticsToProblemsStringfromsrc/integrations/diagnostics; no new dependencies.path.relative(cwd, ...).toPosix()so edited-file matching is consistent across platforms.Get in Touch
kels9009
Interactively review PR in Roo Code Cloud